package a1;


import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Random;

public class MianBan extends JFrame{
    public MianBan() {
        initMianBan();
        addTextArea();
        addButton();
        this.setVisible(true);

    }


    public void initMianBan(){
        this.setSize(1000,565);
        this.setTitle("人事管理系统");
        this.setLocationRelativeTo(null);
        this.setDefaultCloseOperation(3);
        this.setAlwaysOnTop(true);
        this.setLayout(null);
    }
    public void addButton(){
        JButton button0=new JButton("哈");
        button0.setBounds(100,50,250,50);
        JButton button1=new JButton("哈");
        button1.setBounds(100,100,250,50);
        JButton button2=new JButton("哈");
        button2.setBounds(100,150,250,50);
        JButton button3=new JButton("哈");
        button3.setBounds(100,200,250,50);
        JButton button4=new JButton("哈");
        button4.setBounds(100,250,250,50);
        JButton button5=new JButton("哈");
        button5.setBounds(650,50,250,50);
        JButton button6=new JButton("哈");
        button6.setBounds(650,100,250,50);
        JButton button7=new JButton("哈");
        button7.setBounds(650,150,250,50);
        JButton button8=new JButton("哈");
        button8.setBounds(650,200,250,50);
        JButton button9=new JButton("哈");
        button9.setBounds(650,250,250,50);
        this.getContentPane().add(button0);
        this.getContentPane().add(button1);
        this.getContentPane().add(button2);
        this.getContentPane().add(button3);
        this.getContentPane().add(button4);
        this.getContentPane().add(button5);
        this.getContentPane().add(button6);
        this.getContentPane().add(button7);
        this.getContentPane().add(button8);
        this.getContentPane().add(button9);

    }
    public void addEndButton(){
        JButton button1=new JButton();
        button1.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {

            }
        });
    }
    public void addTextArea(){
        JTextArea jTextArea=new JTextArea();
        jTextArea.setBounds(50,300,900,200);
        this.getContentPane().add(jTextArea);
    }
    JTextArea jTextArea=new JTextArea();


    public static void main(String[] args) {

MianBan mb=new MianBan();

    }
}
